#ifndef QuadCommand_h__
#define QuadCommand_h__


#include <d3d11.h>
#include <string>
#include <wrl/client.h>
#include <dxgi1_2.h>
#include <vector>
#include "RenderCommand.h"
#include "Material.h"
#include "IDirectRender.h"
#include "../base/VertexType.h"
#include "../base/Matrix.h"
#include "Program.h"
namespace SkyEngine2d
{
	
	class QuadCommand
		:public RenderCommand
	{
	public:
		QuadCommand();
		~QuadCommand();
	
		void init(
			int globalZOrder,
			const Matrix4X4 & mat,
			const std::shared_ptr<Material> &material,
			Program	*				program,
			const std::vector<VertexPositionTexture> vertexBuffer
		);
	
		void updateMat(const Matrix4X4 & mat);
		void updateGloablZOrder(int gz);
	
		std::vector<VertexPositionTexture> & getVertexBuffer() { return m_vertexBuffer; }
		Program	* getProgram()const { return m_program; }
		std::shared_ptr<Material> getMaterial()const { return m_material; }
	private:
		std::shared_ptr<Material> m_material;
		std::vector<VertexPositionTexture> m_vertexBuffer;
		
		Matrix4X4 m_mat;
		Program	*	m_program;
	
	public:
		static UINT index[6];
	};
}

#endif // QuadCommand_h__
